<p class="page-announce" style="font-size:1.3em;">
	Convert money in your account from USD to EUR, from EUR to GBP, or to nearly any other convertible currency. 
</p>

<p>
	Fields marked with 
	<span class='required'>*</span>
	 are required.
</p>


<div class='form'>
	<form id="exchangeForm" method='post' action="<?php echo site_url("user/account/operations/exchange/save")?>"  onsubmit="return Send('#exchangeForm');">
		<div class="line" id="">
			<label id="convertFromLbl" for="convertFrom">Source of Founds</label>
			<select id="convertFrom" name="convertFrom">
				<option value="">Select one</option>
				<?php foreach ($wallet_list as $value):?>
					<?php 
						$from_value = $value["WALLET_ID"] . "-" . $value["CURRENCY_ID"];
						if($from_value == $from_id){
							$selected = "selected='selected'";
						}
						else	$selected = "";
					?>
					<option value="<?php echo $from_value;?>" <?php echo $selected;?>>
						<?php echo $value["NAME"] . " - " . $value["C_SIGN"] . $value["AMMOUNT"] . " " . $value["C_SYMBOL"];?>
					</option>
				<?php endforeach;?>
			</select>
			<span class="error-validator" style="display:none;">
				<span id="convertFromErr"></span>
			</span>
		</div>
		<div class="line">
			<label id="convertToLbl" for="convertTo">Convert To</label>
			<select id="convertTo" name="convertTo">
				<option value="">Select one</option>
				<?php foreach ($currencies as $value):?>
					<?php 
						$to_value = $value["ID"];
						if($to_value == $to_id){
							$selected = "selected='selected'";
						}
						else	$selected = "";
					?>
					<option value="<?php echo $value["ID"];?>" <?php echo $selected;?>>
						<?php echo $value["C_SYMBOL"];?>
					</option>
				<?php endforeach;?>
			</select>
			<span class="error-validator" style="display:none;">
				<span id="convertToErr"></span>
			</span>
		</div>
		
		<div class="line">
			<label id="ammountLbl" for="ammount">
				Ammount
				<span class="required">*</span>
			</label>
			<input type="text" id="ammount" value="<?php echo $value_ammount;?>" name="ammount" style="" />
			<span class="error-validator" style="display:none;">
				<span id="ammountErr"></span>
			</span>
		</div>
			<div style="clear:both;"></div>
		
		<div class="line">
			<label id="exTypeLbl">
				Exchange Type
			</label>
			<div class='value'>
				<span>
					<input type="radio" id="exchangeType1" value="1" class='ex_type' name="exType" <?php echo $exType == "1" ? 'checked="checked"' : $exType != '2' ? 'checked="checked"' : ''; ?> style="" />	
					<label id="exType1Lbl" for="exchangeType1">Ammount to exchange
					<br /><span style='font-weight:normal;font-size:70%;'>(I want to exchange this ammount)</span>
					</label>
				</span>
			<div style="clear:both;"></div>
				
				<br />
				<span>
					<input type="radio" id="exchangeType2" value="2"  class='ex_type' name="exType" <?php echo $exType == "2" ? 'checked="checked"' : ''; ?>  style="" />
					<label id="exType2Lbl" for="exchangeType2">Ammount to get
					<br /><span style='font-weight:normal;font-size:70%;'>(I want to get this ammount)</span>
					</label>
				</span>
			</div>			
<!--			<div style="clear:both;"></div>-->
		</div>
		
		<fieldset class="submit">
			<div class="input-button-block">
				<input type="submit" id="btnInternalTransfer" onclick="" value="Next" name="btnInternalTransfer">
			</div>
		</fieldset>
	</form>
</div>